


export default {
  data() {
    return {}
  },
  computed: {
    setValue(){
        return (value)=>{
          
          return value ? value : undefined
        }
    },
    selectTtreeList() {
      return (list, filed,key) => {
        if (filed) {
          return this.selectTreeSrocessingData(list, filed,key)
        } else {
          return list
        }
      }
    },
  },
  methods: {
    selectTreeSrocessingData(list, filed,key) {
      list.forEach((item) => {
        item['scopedSlots'] = {
          title: 'title',
        }
        if (item[filed]?.length > 0) {
          this.selectTreeSrocessingData(item[filed], filed,key)
        }
      })
      console.log(list,key)
      return list
    },
    setSelectValueV2(id,obj,fieldId,value){
       obj[fieldId] = value
        if(this[`change${id}`]){
         this[`change${id}`]()
        }
        
      }
  },
}

